<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
	<style type="text/css">
</style>
	<title>ProLinear</title>
</h:head>
<h:body>
	<div align="center">
		<p:growl id="messages" />
		<h:form id="geral">
			<p:layout fullPage="true">
				<p:layoutUnit position="center">
					<ui:insert name="conteudo" />
				</p:layoutUnit>
				<p:layoutUnit position="north" style="height:30px">
					<p:toolbar>
						<p:toolbarGroup align="left">
							<h:outputLabel value="Olá, #{admBean.usuario.nome}" />
						</p:toolbarGroup>

						<p:toolbarGroup align="right">
							<p:commandButton icon="ui-icon-help" title="Ajuda"
								style="width:40px" action="/pages/help.jsf?faces-redirect=true" />
							<p:button icon="ui-icon-power" title="Sair"
								href="/j_spring_security_logout" style="width:40px" />

						</p:toolbarGroup>

					</p:toolbar>
				</p:layoutUnit>
				<p:layoutUnit position="west" width="230" header="Menu"
					collapsible="true">
					<p:menu style="width:100%">
						<p:menuitem value="Usuários" url="/pages/admin/homeAdm.jsf" />
						<p:menuitem value="Documentos" url="/pages/admin/admDocs.jsf" />
						<p:menuitem value="Meus Dados"
							url="/pages/admin/cadastroAdm.jsf?update=true" />
						<p:menuitem value="Novo Administrador"
							url="/pages/admin/cadastroAdm.jsf" />
					</p:menu>
				</p:layoutUnit>
			</p:layout>
			<p:dialog id="mailDlg" header="Enviar email"
				widgetVar="dlgMail" modal="true" height="400" width="600"
				draggable="false" resizable="false">
				<h:panelGrid id="grid" columns="1" cellpadding="1" cellspacing="1" style="width:100%">
					<h:outputText value="Assunto" />
					<p:inputText value="#{admBean.assuntoMail}"
						style="width:100%" />
					<h:outputText value="Mensagem" />
					<p:inputTextarea value="#{admBean.email}" style="width:100%;height:250px"/>
				</h:panelGrid>
				<h:panelGrid columns="2" cellpadding="5">
					<p:commandButton value="Enviar" style="width:100px" ajax="false"
						actionListener="#{admBean.enviaEmailAlunos}"
						oncomplete="dlgMail.hide()">
					</p:commandButton>
					<p:commandButton value="Cancelar" onclick="dlgMail.hide()"
						immediate="true" />
				</h:panelGrid>
			</p:dialog>
		</h:form>
	</div>
</h:body>
</html>